package com.bgs.eat.area.mapper;

import com.bgs.eat.area.entity.AreaEntity;
import com.bgs.eat.config.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AreaMapper extends BaseMapper<AreaEntity> {

    /**
    * @Description 查询市级城市信息列表
    * @Author lzy
    * @Date 2022/10/11 16:54
    * @Return java.util.List<com.bgs.eat.area.entity.AreaEntity>
    * @param id
    */
    @Select("select * from area where pid = #{id}")
    @Results({
            @Result(property = "mergerName",column = "merger_name"),
            @Result(property = "zipCode",column = "zip_code"),
    })
    List<AreaEntity> selectArea(Integer id);
}
